package com.hqyj.system.controller;


import com.hqyj.system.pojo.SysPermission;
import com.hqyj.system.service.ISysPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * <p>
 * 权限表 前端控制器
 * </p>
 *
 * @author rock
 * @since 2021-11-30
 */
@RestController
@RequestMapping("/sys-permission")
public class SysPermissionController {
    @Autowired
    ISysPermissionService sysPermissionService;

    //加载表格数据
    @RequestMapping("/permissionList")
    public HashMap<String,Object> listPage(SysPermission a){
        return sysPermissionService.select(a);
    }
    //修改
    @RequestMapping("/update")
    public HashMap<String,Object>  update(SysPermission a){
        return sysPermissionService.update(a);
    }
    //新增
    @RequestMapping("/add")
    public HashMap<String,Object> add(SysPermission a){
        return sysPermissionService.add(a);
    }

    //删除
    @RequestMapping("/del")
    public HashMap<String,Object> del(Integer id){
        return sysPermissionService.del(id);
    }


}

